<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class ModfiyTaskPushTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('task_push', function (Blueprint $table) {
            $table->unsignedInteger('employer_id')->comment('悬赏主id');
            $table->unsignedInteger('user_id')->comment('用户id');
            $table->unsignedInteger('task_id')->comment('任务id');
            $table->unsignedInteger('cooperative_id')->comment('合作商id');
            $table->unsignedInteger('received_cooperative_id')->comment('接收方合作商id');
            $table->unsignedInteger('admin_user_id')->comment('操作人员id');
            $table->string('phone')->comment('用户|悬赏主手机');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('task_push', function (Blueprint $table) {
            $table->dropColumn('user_id');
            $table->dropColumn('employer_id');
            $table->dropColumn('task_id');
            $table->dropColumn('cooperative_id');
            $table->dropColumn('received_cooperative_id');
            $table->dropColumn('admin_user_id');
            $table->dropColumn('phone');
        });
    }
}
